<template>
	<view>
		<view class="search_box">
			<image src="../../static/s1.png" class="goback" @click="gobackClick" mode="widthFix"></image>
			<text class="topicText">消灾祈福</text>
		</view>
		<view class="templeBox">
			<image src="../../static/bgc7.png" style="width: 100%;" mode="widthFix"></image>
			<view class="templeMoney">
				<text>布施金额</text>
				<view class="moneyInp">
					<text>￥</text>
					<input type="text" value="" class="inpText" />
				</view>
				<view class="amend" @click="openClcik">
					<input type="text" value="" v-model="userName" class="nameText" placeholder="请留下您的名字" />
					<text style="color: #C52B2E;">修改</text>
				</view>
			</view>
		</view>
		<!-- 输入姓名弹窗 -->
		<uni-popup ref="popup" type="center">
			<view class="hintPop">
				<text>请输入您的名字</text>
				<input type="text" value="" class="hintInp" placeholder="最多输入10个字！" v-model="userName" />
				<view class="footBtn">
					<text class="cancel" @click="close">取消</text>
					<text class="cancel" style="color: #C52B2E; border: 0;" @click="confrim">确定</text>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	import uniPopup from '@/components/uni-popup/uni-popup.vue'
	import uniPopupMessage from '@/components/uni-popup/uni-popup-message.vue'
	import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
	export default {
		data() {
			return {
				userName: '',
				flag:true

			}
		},
		components: {
			uniPopup,
			uniPopupMessage,
			uniPopupDialog
		},
		methods: {
			gobackClick() {
				uni.navigateTo({
					url: '../Buddha/Ectronic'
				})
			},
			//弹窗
			openClcik() {
				this.$refs.popup.open()
				this.userName = ''
			},
			close() {
				this.$refs.popup.close()
			},
			confrim() {
				this.$refs.popup.close()
				this.userName = userName
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #eee;
	}

	.templeBox {
		display: flex;
		flex-direction: column;
		width: 100%;
		padding: 10rpx 20rpx;
		box-sizing: border-box;

		.templeMoney {
			display: flex;
			box-sizing: border-box;
			flex-direction: column;
			padding: 20rpx;
			width: 100%;
			color: #757474;
			font-size: 30rpx;
			background-color: #fff;

			.moneyInp {
				display: flex;
				align-items: center;
				width: 100%;
				padding: 10rpx 0;
				background-color: #fff;
				font-size: 56rpx;
				color: #C52B2E;
				border-bottom: 2rpx dotted #757474;

				.inpText {
					width: 100%;
					height: 100%;
					color: #333;
				}

			}

			.amend {
				display: flex;
				align-items: center;
				justify-content: center;
				margin: 40rpx auto 20rpx;
				width: 100%;

				//	background-color: pink;
				.nameText {
					//padding: 0 5rpx;
					font-size: 28rpx;
					//background-color: #f5f5f5;
					text-align: center;
				}
			}

		}
	}

	.hintPop {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 600rpx;
		padding: 40rpx 0rpx 0rpx;
		background-color: #fff;
		border-radius: 20rpx;
		box-sizing: border-box;
		font-size: 30rpx;
		color: #333333;

		.hintInp {
			width: 80%;
			height: 67rpx;
			border: 1rpx solid #ccc;
			margin: 40rpx 0;
			border-radius: 10rpx;
			padding-left: 20rpx;
			font-size: 24rpx;
			color: #757474;
		}

		.footBtn {
			display: flex;
			align-items: center;
			justify-content: center;
			width: 100%;
			height: 100rpx;
			border-top: 1rpx solid #ccc;
			//background-color: pink;
			border-radius: 0 0 20rpx 20rpx;

			.cancel {
				display: flex;
				align-items: center;
				justify-content: center;
				width: 50%;
				height: 100%;
				border-right: 1rpx solid #ccc;
			}

		}
	}
</style>
